Reverting toArray call, it is valid to pass in pre-alloc size #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts a change in pr Multiple targets in lint runner #40. As per javadocs
https://docs.oracle.com/javase/7/docs/api/java/util/Set.html#toArray(T[])
and
If the set fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this set.
Passing size is a valid thing to do.
Current behavior is the same as
(JsonFile[]) filesToLint.toArray()
What is the new behavior (if this is a feature change)?
Array is optimized with same size as needed and no longer makes an unnecessary array of size 0 on each toArray call.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
None.
Other information: